object StringFormat {
    def main(args: Array[String]): Unit = {
        // 1. `+`连接
        var s1: String = "hello"
        var s2: String = "world"
        println(s1+s2)
        // 2. 类C的`sprintf`占位符格式化
        var name: String = "kkkkk"
        var age: Int = 18
        var sal: Float = 3336.9f
        printf("name=%s, age=%d, sal=%f", name, age, sal)
        // 3. 类PHP的`$变量`
        println()
        println(s"name=$name, age=$age, sal=$sal ")
        println(s"name=$name, age=${age + 1}, sal=${sal * 4} ")
    }
}